<?php
error_reporting(0);
session_start();
defined('BASEPATH') OR exit('No direct script access allowed');


class Goods extends CI_Controller {
	public function __construct(){
		$this->need_login = false;//控制是否需要登录
		parent::__construct();
	}
	public function index()
	{
		$this->load->model("Goods_model");
		$data['data'] = $this->Goods_model->getAll();

		$this->load->model("User_model");//用户信息
		$data['session'] = $this->User_model->getOne($_SESSION['data']);
		$this->load->view('goods',$data);
	}
	public function balance()
	{
		$this->load->model("Balance_log_model");
		$data['data'] = $this->Balance_log_model->getAll($_SESSION['data']);
		$this->load->view('balance',$data);
	}
}
